3.415 \(\int \frac {1}{\sqrt {x^n (a+b x^{2-n})}} \, dx\)

Optimal. Leaf size=37 \[ \frac {2 \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a x^n+b x^2}}\right )}{\sqrt {b} (2-n)} \]

[Out]

2*arctanh(x*b^(1/2)/(b*x^2+a*x^n)^(1/2))/(2-n)/b^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {1979, 2008, 206} \[ \frac {2 \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a x^n+b x^2}}\right )}{\sqrt {b} (2-n)} \]

Antiderivative was successfully verified.

[In]

Int[1/Sqrt[x^n*(a + b*x^(2 - n))],x]

[Out]

(2*ArcTanh[(Sqrt[b]*x)/Sqrt[b*x^2 + a*x^n]])/(Sqrt[b]*(2 - n))

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 1979

Int[(u_)^(p_), x_Symbol] :> Int[ExpandToSum[u, x]^p, x] /; FreeQ[p, x] && GeneralizedBinomialQ[u, x] &&  !Gene
ralizedBinomialMatchQ[u, x]

Rule 2008

Int[1/Sqrt[(a_.)*(x_)^2 + (b_.)*(x_)^(n_.)], x_Symbol] :> Dist[2/(2 - n), Subst[Int[1/(1 - a*x^2), x], x, x/Sq
rt[a*x^2 + b*x^n]], x] /; FreeQ[{a, b, n}, x] && NeQ[n, 2]

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {x^n \left (a+b x^{2-n}\right )}} \, dx &=\int \frac {1}{\sqrt {b x^2+a x^n}} \, dx\\ &=\frac {2 \operatorname {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {b x^2+a x^n}}\right )}{2-n}\\ &=\frac {2 \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {b x^2+a x^n}}\right )}{\sqrt {b} (2-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.10, size = 78, normalized size = 2.11 \[ -\frac {2 \sqrt {a} x^{n/2} \sqrt {\frac {b x^{2-n}}{a}+1} \sinh ^{-1}\left (\frac {\sqrt {b} x^{1-\frac {n}{2}}}{\sqrt {a}}\right )}{\sqrt {b} (n-2) \sqrt {a x^n+b x^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[1/Sqrt[x^n*(a + b*x^(2 - n))],x]

[Out]

(-2*Sqrt[a]*x^(n/2)*Sqrt[1 + (b*x^(2 - n))/a]*ArcSinh[(Sqrt[b]*x^(1 - n/2))/Sqrt[a]])/(Sqrt[b]*(-2 + n)*Sqrt[b
*x^2 + a*x^n])

________________________________________________________________________________________

fricas [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^n*(a+b*x^(2-n)))^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (co
nstant residues)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {{\left (b x^{-n + 2} + a\right )} x^{n}}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^n*(a+b*x^(2-n)))^(1/2),x, algorithm="giac")

[Out]

integrate(1/sqrt((b*x^(-n + 2) + a)*x^n), x)

________________________________________________________________________________________

maple [F]  time = 0.76, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {\left (b \,x^{-n +2}+a \right ) x^{n}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(x^n*(a+b*x^(-n+2)))^(1/2),x)

[Out]

int(1/(x^n*(a+b*x^(-n+2)))^(1/2),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {{\left (b x^{-n + 2} + a\right )} x^{n}}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^n*(a+b*x^(2-n)))^(1/2),x, algorithm="maxima")

[Out]

integrate(1/sqrt((b*x^(-n + 2) + a)*x^n), x)

________________________________________________________________________________________

mupad [B]  time = 5.21, size = 67, normalized size = 1.81 \[ \frac {\sqrt {a}\,x^{n/2}\,\mathrm {asin}\left (\frac {\sqrt {b}\,x^{1-\frac {n}{2}}\,1{}\mathrm {i}}{\sqrt {a}}\right )\,\sqrt {\frac {b\,x^{2-n}}{a}+1}\,1{}\mathrm {i}}{\sqrt {b}\,\left (\frac {n}{2}-1\right )\,\sqrt {a\,x^n+b\,x^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(x^n*(a + b*x^(2 - n)))^(1/2),x)

[Out]

(a^(1/2)*x^(n/2)*asin((b^(1/2)*x^(1 - n/2)*1i)/a^(1/2))*((b*x^(2 - n))/a + 1)^(1/2)*1i)/(b^(1/2)*(n/2 - 1)*(a*
x^n + b*x^2)^(1/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {x^{n} \left (a + b x^{2 - n}\right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x**n*(a+b*x**(2-n)))**(1/2),x)

[Out]

Integral(1/sqrt(x**n*(a + b*x**(2 - n))), x)

________________________________________________________________________________________